<section id="nav_menu-6" class="widget widget_nav_menu">
{if $moduletitle || $first_item != 0}
    <h4 class="widget-title">{if $first_item != 0}
                <a title="{$first_item->name}" alt="{$first_item->name}" {if $first_item->view_style == 0} href="{$first_item->url}" {else}href="{link action=detail name=$first_item->seo_link}"{/if} {if $first_item->opennew == 1} target="_blank"{/if} >{$first_item->name}</a>
            {else}
                {$moduletitle}
            {/if}</h4>
            {/if}
    <div class="menu-pages-container">
        <ul id="menu-pages" class="menu_right">
        
            {foreach name=links from=$links item=link}
            {math equation="x-1" x=$link->rank assign=prev}
            {math equation="x+1" x=$link->rank assign=next}
            
            <li {if $smarty.foreach.links.first==1}style="border-top: 0px;"{/if} class="menu-item menu-item-type-post_type menu-item-object-page" >
                <a title="{$link->name}" alt="{$link->name}" {if $link->view_style == 0} href="{$link->url}" {else}href="{link action=detail name=$link->seo_link}"{/if} {if $link->opennew == 1} target="_blank"{/if} >{$link->name}</a>
                
            </li>
            {foreachelse}
            <li align="center"><i>{$_TR.no_link}</i></li>    
            {/foreach}
            
            
        </ul>
        {permissions level=$smarty.const.UILEVEL_NORMAL}
            {if $permissions.create == 1}
                <div class="actions" style="margin: 10px 0px 10px 15px; "> 
                    <a href="{link action=manage}" class="add">{$_TR.new_link}</a>
                </div>    
            {/if}
            {/permissions}
        </div>
        </section>        